﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace PruebaMVC
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{moneda}/{variante}",
                defaults: new { controller = "Home", action = "Index", moneda = UrlParameter.Optional, variante = UrlParameter.Optional }
            );

            //routes.MapRoute(
            //    name: "Monedas Nivel 2",
            //    url: "monedas/{moneda}/{variante}",
            //    defaults: new { controller = "Monedas", action = "DetallesNivel2" },
            //    constraints: new { moneda = @"^[a-zA-Z]+$", variante = @"^[a-zA-Z]+$" }
            //);

            //routes.MapRoute(
            //    name: "Monedas Nivel 1",
            //    url: "monedas/{moneda}",
            //    defaults: new { controller = "Monedas", action = "DetallesNivel1"},
            //    constraints: new { moneda = @"^[a-zA-Z]+$"}
            //);

            //routes.MapRoute(
            //    name: "Default",
            //    url: "{controller}/{action}/{id}",
            //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            //);
        }
    }
}